package recallin.navigation;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

public class Way implements Comparable<Way>{

	private ArrayList<Long> nodes = new ArrayList<Long>();
	private HashMap<String, String> tags = new HashMap<String, String>();
	
	
	public Way() {
	}
	public Way(ArrayList<Long> nodes, HashMap<String, String> tags) {
		this.nodes = nodes;
		this.tags = tags;
	}
	public ArrayList<Long> getNodes() {
		return nodes;
	}
	public void setNodes(ArrayList<Long> nodes) {
		this.nodes = nodes;
	}
	public HashMap<String, String> getTags() {
		return tags;
	}
	public void setTags(HashMap<String, String> tags) {
		this.tags = tags;
	}
	public int compareTo(Way o) {

		if(this.nodes.equals(o.nodes) && this.tags.equals(o.tags))
			return 0;
		else
			return 1;
	}
	@Override
	public boolean equals(Object obj) {
		Way w = (Way) obj;
		return this.getNodes().equals(w.getNodes());
	}
	@Override
	public String toString() {
		return "Way [nodes=" + nodes + ", tags=" + tags + "]";
	}
	
}
